﻿namespace CryptoQrUtilities.Cryption
{
    /// <summary>
    /// Defines the decryptor/encryptor used for a given byte buffer.
    /// Allows the decoupling of the message type and the way to decrypt it, as well as the decoupling of the
    /// implementation of the private key container from the actual process of the decryption.
    /// </summary>
    public interface IMessageDencrypter
    {
        /// <summary>
        /// When implemented, this is the way to decrypt the given message.
        /// The decryptor is assumed to know the structure of the message, if it is also serialized.
        /// </summary>
        /// <param name="message">An encrypted message in a byte buffer.</param>
        /// <returns>The clear text decrypted message.</returns>
        string DecryptMessage(QrMessage message);
    }
}
